package com.itfreer.special.report;

import java.io.Serializable;
import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.form.api.reflect.DictionaryField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * 定义报表数据定义实体
 */
@Entity(name = "special_report_dictionary")
public class ReportDictionaryEntity extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键ID
	 */
	@Id
	@Column(name = "d_id", length = 50, nullable = true)
	private String id;

	/**
	 * 名称
	 */
	@Column(name = "data_name", length = 50, nullable = true)
	private String dataname;

	/**
	 * 数据表名
	 */
	@Column(name = "data_table", length = 50, nullable = true)
	private String datatable;

	/**
	 * 元数据
	 */
	@Column(name = "meta_data", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "f_metadata_directory", toFieldName = "metadataName")
	private String metadata;

	@Transient
	private String metadataName;

	/**
	 * 政区字段
	 */
	@Column(name = "admin_fields", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "p_administrative", toFieldName = "adminName")
	private String adminfields;

	@Transient
	private String adminName;

	/**
	 * 排序
	 */
	@Column(name = "i_order", nullable = true)
	private Integer order;

	/**
	 * 有效
	 */
	@Column(name = "b_valid", nullable = true)
	private Boolean valid;

	/**
	 * 表头格式
	 */
	@Column(name = "table_head", nullable = true, columnDefinition = "TEXT")
	private String tableHead;

	/**
	 * 合并字段
	 */
	@Column(name = "merge_field", nullable = true)
	private String mergefield;

	/**
	 * 主键ID
	 */
	public String getId() {
		return id;
	}

	/**
	 * 主键ID
	 */
	public void setId(String value) {
		this.id = value;
	}

	/**
	 * 名称
	 */
	public String getDataname() {
		return dataname;
	}

	/**
	 * 名称
	 */
	public void setDataname(String value) {
		this.dataname = value;
	}

	/**
	 * 数据表名
	 */
	public String getDatatable() {
		return datatable;
	}

	/**
	 * 数据表名
	 */
	public void setDatatable(String value) {
		this.datatable = value;
	}

	/**
	 * 元数据
	 */
	public String getMetadata() {
		return metadata;
	}

	/**
	 * 元数据
	 */
	public void setMetadata(String value) {
		this.metadata = value;
	}

	/**
	 * 政区字段
	 */
	public String getAdminfields() {
		return adminfields;
	}

	/**
	 * 政区字段
	 */
	public void setAdminfields(String value) {
		this.adminfields = value;
	}

	/**
	 * 排序
	 */
	public Integer getOrder() {
		return order;
	}

	/**
	 * 排序
	 */
	public void setOrder(Integer value) {
		this.order = value;
	}

	/**
	 * 有效
	 */
	public Boolean getValid() {
		return valid;
	}

	/**
	 * 有效
	 */
	public void setValid(Boolean value) {
		this.valid = value;
	}

	public String getAdminName() {
		return adminName;
	}

	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}

	public String getMetadataName() {
		return metadataName;
	}

	public void setMetadataName(String metadataName) {
		this.metadataName = metadataName;
	}

	public String getTableHead() {
		return tableHead;
	}

	public void setTableHead(String tableHead) {
		this.tableHead = tableHead;
	}

	public String getMergefield() {
		return mergefield;
	}

	public void setMergefield(String mergefield) {
		this.mergefield = mergefield;
	}

}
